package com.qhong.spring.utils;

/**
 * 创建命名规则帮助类
 *
 * @author ranger
 *
 */
public class NamingUtils {
	/**
	 * 将类名修改为对象名，首字母小写
	 *
	 * @param className
	 */
	public static String firstCharToLower(String className) {
		StringBuilder sb = new StringBuilder(className);
		//修改首字符为小写
		sb.setCharAt(0, Character.toLowerCase(sb.charAt(0)));
		return sb.toString();

	}

	/**
	 * 将类名修改为对象名，首字母大写
	 *
	 * @param className
	 */
	public static String firstCharToUpper(String className) {
		StringBuilder sb = new StringBuilder(className);
		//修改首字符为小写
		sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
		return sb.toString();

	}

	public static void main(String[] args) {

		System.out.println(NamingUtils.firstCharToUpper("bbbb"));
	}

}

